home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilMemCacheImg.z / ilMemCacheImg
Encoding:
Text File  |  2002-10-03  |  42.5 KB  |  793 lines

  1.  
  2.  
  3.  
  4. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg - class to implement image data caching in main memory
  10.  
  11.  
  12. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  13.      ilLink : ilImage : ilCacheImg
  14.  
  15.  
  16. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  17.      #include <il/ilMemCacheImg.h>
  18.  
  19.  
  20. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      ilMemCacheImg implements memory caching for two different types of image
  22.      data:  files and operators.
  23.  
  24.      For image files, the cache stores raw or uncompressed data.  If the image
  25.      is stored by rows, the cache is allocated by rows matching those in the
  26.      file.  If the files are stored in rectangular chunks, the cache is
  27.      allocated in pieces that are the size and shape of the chunks.
  28.  
  29.      For image operators, the cache stores the processed results.
  30.  
  31.      A cache image stores its data in fixed-size rectangles called _p_a_g_e_s.  A
  32.      _t_i_l_e is an arbitrary rectangle of image data, which usually spans
  33.      multiple pages.  The image access functions (ggggeeeettttTTTTiiiilllleeee(((()))) and sssseeeettttTTTTiiiilllleeee(((()))) and
  34.      their variants) allow arbitrary access to any contiguous rectangle of
  35.      image data.  Because these accesses usually do not match the underlying
  36.      storage format, ilMemCacheImg performs any necessary reformatting of the
  37.      image data.
  38.  
  39.  
  40.    UUUUssssiiiinnnngggg iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg
  41.      Like ilImage, ilMemCacheImg is an abstract class, requiring further
  42.      derivation to be used as an object.  The virtuals inherited from ilImage,
  43.      qqqqGGGGeeeettttTTTTiiiilllleeee3333DDDD(((()))) and qqqqSSSSeeeettttTTTTiiiilllleeee3333DDDD(((()))), along with qqqqFFFFiiiillllllllTTTTiiiilllleeee3333DDDD(((()))) and
  44.      qqqqCCCCooooppppyyyyTTTTiiiilllleeeeCCCCffffgggg(((()))), are all implemented by this class.  These functions
  45.      provide the necessary conversion from the data pages in the cache to the
  46.      user's tile requests.
  47.  
  48.      The virtual methods hhhhaaaassssPPPPaaaaggggeeeessss(((()))), qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))) and uuuunnnnlllloooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))),
  49.      inherited from ilImage, are also implemented by this class, hiding the
  50.      ilImage implementations.
  51.  
  52.      qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((())))  locks the specified pages in the cache and, if necessary,
  53.                      waits until the data is read into the cache.
  54.  
  55.      uuuunnnnlllloooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))) removes the lock on the specified pages (See also the
  56.                      iiiillllTTTTiiiilllleeeeIIIImmmmggggIIIItttteeeerrrr man page).
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  71.  
  72.  
  73.  
  74.      hhhhaaaassssPPPPaaaaggggeeeessss(((())))      returns TRUE since this class uses the paging mechanism.
  75.  
  76.      Additionally, the virtuals ggggeeeettttCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))) and fffflllluuuusssshhhh(((()))), inherited from
  77.      ilCacheImg, are implemented by this class.  ggggeeeettttCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))) returns the
  78.      cache (byte) size by multiplying the number of pages resident in cache
  79.      times the object's page size.  The fffflllluuuusssshhhh(((()))) function causes modified pages
  80.      in cache to be written out from main memory to backing store, and
  81.      optionally discards any resident pages.  Most of the details of page
  82.      management are implemented by the helper class, ilPager; see the man page
  83.      for that class for more information on the paging scheme.
  84.  
  85.  
  86.    DDDDeeeerrrriiiivvvviiiinnnngggg nnnneeeewwww iiiimmmmaaaaggggeeee ccccllllaaaasssssssseeeessss
  87.      New image operators should derive from ilOpImg or one of its derived
  88.      subclasses: ilMonadicImg, ilPolyadicImg, ilSpatialImg, ilWarpImg, and
  89.      ilFPolyadicImg. Deriving from ilOpImg directly is more complicated than
  90.      deriving from one of it's descendants; try to find a suitable subclass of
  91.      ilOpImg to derive from if possible.
  92.  
  93.      Image file classes should be derived using the IFL (Image Format
  94.      Library); see the IFL man page for more information.  Such derived
  95.      classes can be accessed within the IL using ilFileImg.
  96.  
  97.  
  98.    PPPPaaaaggggeeee rrrreeeeqqqquuuueeeesssstttt pppprrrroooocccceeeessssssssiiiinnnngggg
  99.      If you derive directly from ilMemCacheImg (or ilOpImg), you need to be
  100.      aware of the details of how image data requests are processed through the
  101.      multi-processing  scheme defined by the ilMpManager and ilMpRequest
  102.      classes.
  103.  
  104.      When a tile is referenced by a call to a data access method of an
  105.      ilMemCacheImg object, the set of pages that the tile overlaps is looked
  106.      up in the cache; if a page is resident it is simply reused.  For each
  107.      non-resident page, an ilMpCacheRequest is issued to bring that page into
  108.      the cache.  These requests may be processed concurrently on multi-
  109.      processor machines.  Each cache page request passes through three phases
  110.      of execution.  A phase is represented by a virtual method (whose only
  111.      argument is the request object,) which performs one of these actions:
  112.  
  113.      _p_r_e_p_a_r_e     In this initial phase any input data that is needed by the
  114.                  page being processed is read in. Typically this will be done
  115.                  either by using qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt() or qqqqGGGGeeeettttSSSSuuuubbbbTTTTiiiilllleeee3333DDDD() on the
  116.                  input image(s) of an operator.  The asynchronous versions of
  117.                  these operations must be used so that the IL can prepare
  118.                  ahead of what it needs.  This allows accesses to disk to be
  119.                  queued up before they are needed to improve processing
  120.                  performance.  The request being prepared must be used as the
  121.                  parent node of any asynchronous methods called in this phase;
  122.                  this relationship prevents the parent request from advancing
  123.                  to the next phase until all child requests are completed.
  124.  
  125.                  When qqqqGGGGeeeettttSSSSuuuubbbbTTTTiiiilllleeee3333DDDD() is called, an input data buffer must be
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  137.  
  138.  
  139.  
  140.                  allocated.  You can either provide one or let the call do it
  141.                  for you by passing a data pointer that is initialized to NULL
  142.                  (see ilImage(3) for more details).  All data buffer pointers
  143.                  must be stored in the request structure, not in the image
  144.                  object itself, to allow for concurrent page processing.
  145.  
  146.                  To implement this phase for a derived class you override the
  147.                  definition of the pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() virtual.  Each request
  148.                  invokes that method as it enters the prepare phase; if a
  149.                  request is aborted, however, it might not actually perform
  150.                  this phase.
  151.  
  152.                  By default the page's data are not allocated when
  153.                  pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() is called; the allocation is deferred to
  154.                  just before the call to eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt().  If the page data
  155.                  is needed at prepare time you will need to call
  156.                  sssseeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee() either in the derived class's constructor
  157.                  or rrrreeeesssseeeetttt() (or rrrreeeesssseeeettttOOOOpppp()) method.
  158.  
  159.      _e_x_e_c_u_t_e     A request enters this phase after all child requests (created
  160.                  in the prepare phase) are completed.  It implements the
  161.                  actual computation for derived operator classes.
  162.  
  163.                  To implement this phase for a derived class you override the
  164.                  definition of the eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt() virtual.  Each request
  165.                  invokes that method as it enters the execute phase; if a
  166.                  request is aborted, however, it might not actually execute
  167.                  phase.  To obtain a pointer to the page that is to be filled
  168.                  in, your virtual will call the request's ggggeeeettttDDDDaaaattttaaaa() method.
  169.  
  170.      _f_i_n_i_s_h      This phase is entered for each request in one of two ways:
  171.                  either after the execution phase is complete or for requests
  172.                  that get past the prepare phase but are aborted before
  173.                  reaching the execution phase.  This phase is responsible for
  174.                  cleaning up all resources allocated during the prepare phase;
  175.                  this might include memory allocated for data buffers or pages
  176.                  that were locked in input cache images.
  177.  
  178.                  To implement this phase for a derived class you override the
  179.                  definition of the ffffiiiinnnniiiisssshhhhRRRReeeeqqqquuuueeeesssstttt() virtual.  Each request
  180.                  invokes that method as it enters the finish phase; all
  181.                  requests will perform the finish phase, whether or not they
  182.                  complete successfully.
  183.  
  184.      The virtuals that implement these phases must return an iiiillllSSSSttttaaaattttuuuussss value,
  185.      which may be a ilOKAY, ilPARKED, or an error status.
  186.  
  187.      If ilOKAY is returned, then the phase completed successfully, and this
  188.      request may advance to the next phase (after all child requests are
  189.      completed, if any were created).
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  203.  
  204.  
  205.  
  206.      If ilPARKED is returned, then this request has been parked, presumably to
  207.      wait for a resource; the resource manager is then responsible for
  208.      unparking this request when that resource becomes available to it.
  209.  
  210.      If any other status is returned, the request is presumed to have failed,
  211.      and it will be advanced directly to the finish phase.  If this request is
  212.      a child, then the status value will also be propagated to the parent
  213.      request.
  214.  
  215.      The virtual ggggeeeettttMMMMppppRRRReeeeqqqquuuueeeesssstttt() creates a request structure, which is passed
  216.      as the only argument to the processing virtuals described above.  This
  217.      virtual can be re-defined by derived classes so that they can derive a
  218.      new class from ilMpCacheRequest; objects of the derived type will then be
  219.      passed to the request processing phases.  This is typically used to add
  220.      members to ilMpCacheRequest to hold pointers to any data buffers
  221.      allocated in pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt(((()))).  One example of a class derived from
  222.      ilMpCacheRequest is in <il/ilMonadicImg.h>, where ilMpMonadicRequest is
  223.      defined.
  224.  
  225.  
  226.    BBBBaaaacccckkkkiiiinnnngggg ssssttttoooorrrreeee
  227.      The virtuals ggggeeeettttPPPPaaaaggggeeee() and sssseeeettttPPPPaaaaggggeeee() should only be defined for file
  228.      images; operator images should not define them.  These two virtuals are
  229.      implemented by ilFileImg.
  230.  
  231.      The ggggeeeettttPPPPaaaaggggeeee() virtual is only called if a request in the prepare phase
  232.      sets its next phase to be _i_l_M_p_R_e_a_d (by calling sssseeeettttNNNNeeeexxxxttttSSSSttttaaaatttteeee(), defined on
  233.      ilMpRequest).  It should read data from the backing store or image file
  234.      and place it in the page.
  235.  
  236.      The sssseeeettttPPPPaaaaggggeeee() virtual is called (when the cache is flushed) once for each
  237.      page that has been marked dirty (as a result of being written to by calls
  238.      to sssseeeettttTTTTiiiilllleeee(), ccccooooppppyyyyTTTTiiiilllleeee() or ffffiiiillllllllTTTTiiiilllleeee()).  This method should write the
  239.      data in the page out to the backing store or image file.
  240.  
  241.      Operator images can use sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee() to retain computed pages in a
  242.      temporary file. Any temporary file is automatically removed when the
  243.      operator is reset or deleted.  Use sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh() to control the
  244.      directory in which temporary backing store files are created.
  245.  
  246.  
  247.    MMMMoooonnnniiiittttoooorrrriiiinnnngggg tttthhhheeee ccccaaaacccchhhheeee
  248.      You can watch for cache thrashing (wasted re-calculation of the same
  249.      page) if you enable monitoring with either sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or
  250.      sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee().  You can get the time spent thrashing with
  251.      ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee().  The average time spent computing a page can be obtained
  252.      with ggggeeeettttPPPPaaaaggggeeeeTTTTiiiimmmmeeee() while the total time spent computing pages for an
  253.      image is returned with ggggeeeettttTTTToooottttaaaallllPPPPaaaaggggeeeeTTTTiiiimmmmeeee().
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  269.  
  270.  
  271.  
  272.    CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg tttthhhheeee ccccaaaacccchhhheeee
  273.      Various functions inherited from ilImage (for example, ggggeeeettttPPPPaaaaggggeeeeSSSSiiiizzzzeeee(((()))),
  274.      sssseeeettttPPPPaaaaggggeeeeSSSSiiiizzzzeeee(((())))), and the global routines, iiiillllSSSSeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))),
  275.      iiiillllSSSSeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeFFFFrrrraaaaccccttttiiiioooonnnn(((()))), iiiillllGGGGeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))), iiiillllGGGGeeeettttCCCCuuuurrrrCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))),
  276.      iiiillllGGGGeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeFFFFrrrraaaaccccttttiiiioooonnnn(((()))), can be used to control the operation of the
  277.      cache.
  278.  
  279. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  280.      CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg MMMMuuuullllttttiiii----TTTThhhhrrrreeeeaaaaddddiiiinnnngggg
  281.  
  282.           void enableMP(int on=TRUE)
  283.           int isMPenabled()
  284.  
  285.      PPPPaaaaggggeeee ttttiiiimmmmiiiinnnngggg
  286.  
  287.           float getPageTime()
  288.           float getTotalPageTime()
  289.           void setRetainMode(ilCacheRetainMode mode)
  290.           ilCacheRetainMode getRetainMode()
  291.           void setThrashMode(ilCacheThrashMode mode)
  292.           ilCacheThrashMode getThrashMode()
  293.           float getThrashTime()
  294.           static void setGlobalThrashMode(ilCacheThrashMode mode)
  295.           static ilCacheThrashMode getGlobalThrashMode()
  296.           static void setRetainPath(const char* path)
  297.           static const char* getRetainPath()
  298.  
  299.      RRRReeeeqqqquuuueeeesssstttt pppprrrroooocccceeeessssssssiiiinnnngggg
  300.  
  301.           virtual ilMpCacheRequest* getMpRequest(ilMpManager* parent,
  302.                                                  int x, int y,
  303.                                                  int z, int c,
  304.                                                  int mode=ilLMread)   _p_r_o_t_e_c_t_e_d
  305.           virtual ilStatus prepareRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d
  306.           virtual ilStatus executeRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d
  307.           virtual ilStatus finishRequest(ilMpCacheRequest* req)  _p_r_o_t_e_c_t_e_d
  308.           virtual ilStatus getPage(ilMpCacheRequest* req)   _p_r_o_t_e_c_t_e_d
  309.           virtual ilStatus setPage(ilMpCacheRequest* req)   _p_r_o_t_e_c_t_e_d
  310.  
  311.      MMMMeeeemmmmoooorrrryyyy mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt
  312.  
  313.           void doUserPageAlloc()   _p_r_o_t_e_c_t_e_d
  314.           int isUserPageAlloc()    _p_r_o_t_e_c_t_e_d
  315.           virtual void* allocPage(int x, int y, int z, int c)    _p_r_o_t_e_c_t_e_d
  316.           virtual void freePage(void* data)  _p_r_o_t_e_c_t_e_d
  317.           void setPageAllocTime(AllocTime when)   _p_r_o_t_e_c_t_e_d
  318.           AllocTime getPageAllocTime()  _p_r_o_t_e_c_t_e_d
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  335.  
  336.  
  337.  
  338. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  339.      aaaallllllllooooccccPPPPaaaaggggeeee(((())))
  340.  
  341.           virtual void* allocPage(int x, int y, int z, int c)    _p_r_o_t_e_c_t_e_d
  342.  
  343.  
  344.           This virtual function is used to allocate a page from memory.  It's
  345.           called internally only if the ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) was previously
  346.           invoked.
  347.  
  348.      ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((())))
  349.  
  350.           void doUserPageAlloc()   _p_r_o_t_e_c_t_e_d
  351.  
  352.  
  353.           This function can be used to enable user-defined page allocation
  354.           scheme.  Once this function is invoked, ImageVision Library will
  355.           invoke the aaaallllllllooooccccPPPPaaaaggggeeee(((()))) and ffffrrrreeeeeeeePPPPaaaaggggeeee(((()))) functions whenever a page of
  356.           data needs to be allocated or freed respectively.
  357.  
  358.      eeeennnnaaaabbbblllleeeeMMMMPPPP(((())))
  359.  
  360.           void enableMP(int on=TRUE)
  361.  
  362.  
  363.           This function can be used to enable or diasable multi-threading of
  364.           the processing requests for this object.  If the _o_n parameter is
  365.           TRUE, multi-threading will be enabled, otherwise it will be
  366.           disabled.
  367.  
  368.      eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt(((())))
  369.  
  370.           virtual ilStatus executeRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d
  371.  
  372.  
  373.           This virtual should be re-defined by derived classes to compute the
  374.           requested page; this method is only invoked after all requests
  375.           generated by the prior call to pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() for _r_e_q have been
  376.           completed.
  377.  
  378.      ffffiiiinnnniiiisssshhhhRRRReeeeqqqquuuueeeesssstttt(((())))
  379.  
  380.           virtual ilStatus finishRequest(ilMpCacheRequest* req)  _p_r_o_t_e_c_t_e_d
  381.  
  382.  
  383.           This virtual can be re-defined by derived classes to free any
  384.           resources allocated in the prior call to pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() for _r_e_q,
  385.           and perform any other per-request cleanup.  This may involve
  386.           unlocking input pages or freeing allocated data buffers.  The
  387.           default implementation does nothing.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  401.  
  402.  
  403.  
  404.      ffffrrrreeeeeeeePPPPaaaaggggeeee(((())))
  405.  
  406.           virtual void freePage(void* data)  _p_r_o_t_e_c_t_e_d
  407.  
  408.  
  409.           This virtual function is used to deallocate a page from memory.
  410.           It's called internally only if the ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) was previously
  411.           invoked.
  412.  
  413.      ggggeeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((())))
  414.  
  415.           static ilCacheThrashMode getGlobalThrashMode()
  416.  
  417.  
  418.           This static method returns the thrash mode set with
  419.           sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee().
  420.  
  421.      ggggeeeettttMMMMppppRRRReeeeqqqquuuueeeesssstttt(((())))
  422.  
  423.           virtual ilMpCacheRequest* getMpRequest(ilMpManager* parent,
  424.                                                  int x, int y,
  425.                                                  int z, int c,
  426.                                                  int mode=ilLMread)   _p_r_o_t_e_c_t_e_d
  427.  
  428.  
  429.           This virtual can be redefined in a derived class to change the type
  430.           of request structure that is to be created to handle processing of
  431.           each page for this image.  The request structure returned must be
  432.           derived from ilMpCacheRequest.  The default implementation is:
  433.  
  434.               return new ilMpCacheRequest(parent, x, y, z, c, mode);
  435.  
  436.      A typical derived implementation would look the same except for using a
  437.      class derived from ilMpCacheRequest in its stead.
  438.  
  439.      ggggeeeettttPPPPaaaaggggeeee(((())))
  440.  
  441.           virtual ilStatus getPage(ilMpCacheRequest* req)   _p_r_o_t_e_c_t_e_d
  442.  
  443.  
  444.           This method is redefined in the derived ilFileImg class to read a
  445.           page of data from a disk tile. Currently this is method is not
  446.           useable by other derived classes.
  447.  
  448.      ggggeeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee(((())))
  449.  
  450.           AllocTime getPageAllocTime()  _p_r_o_t_e_c_t_e_d
  451.  
  452.  
  453.           Returns the current setting for the page allocation time; i.e. when
  454.           the page's data should be allocated: prepare time or execute time.
  455.           The default setting is at execute time.
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  467.  
  468.  
  469.  
  470.      ggggeeeettttPPPPaaaaggggeeeeTTTTiiiimmmmeeee(((())))
  471.  
  472.           float getPageTime()
  473.  
  474.  
  475.           Thie method returs the average time to compute a page in the cache
  476.           (includes time to computing parent image pages).
  477.  
  478.      ggggeeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(((())))
  479.  
  480.           ilCacheRetainMode getRetainMode()
  481.  
  482.  
  483.           The method returns the page retention mode as set by
  484.           sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee().
  485.  
  486.      ggggeeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh(((())))
  487.  
  488.           static const char* getRetainPath()
  489.  
  490.  
  491.           This static method returns the directory path to be used for
  492.           temporary files that hold retainted pages as set by sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh().
  493.  
  494.      ggggeeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((())))
  495.  
  496.           ilCacheThrashMode getThrashMode()
  497.  
  498.  
  499.           This method returns the thrash mode set with sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or
  500.           sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee().
  501.  
  502.      ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee(((())))
  503.  
  504.           float getThrashTime()
  505.  
  506.  
  507.           This method returns the total time spent redundantly re-computing or
  508.           re-loading pages for this image (since the last reset) as as result
  509.           of cache thrashing.  This info is only available if enabled with
  510.           sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee().
  511.  
  512.      ggggeeeettttTTTToooottttaaaallllPPPPaaaaggggeeeeTTTTiiiimmmmeeee(((())))
  513.  
  514.           float getTotalPageTime()
  515.  
  516.  
  517.           This method returns the total time spent computing or loading pages
  518.           for this image (since the last reset).
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  533.  
  534.  
  535.  
  536.      iiiissssMMMMPPPPeeeennnnaaaabbbblllleeeedddd(((())))
  537.  
  538.           int isMPenabled()
  539.  
  540.  
  541.           This function can be used to determine if multi-threading of the
  542.           page requests for this object is enabled.  If the returned value is
  543.           TRUE, multi-threading is enabled, otherwise it is disabled.
  544.  
  545.      iiiissssUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((())))
  546.  
  547.           int isUserPageAlloc()    _p_r_o_t_e_c_t_e_d
  548.  
  549.  
  550.           This function can be used to determine is the user-defined
  551.           aaaallllllllooooccccPPPPaaaaggggeeee(((()))) is used for page allocation.  If the returned value is
  552.           TRUE, aaaallllllllooooccccPPPPaaaaggggeeee(((()))) is used, otherwise the default implementation for
  553.           page allocation is used.
  554.  
  555.      pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt(((())))
  556.  
  557.           virtual ilStatus prepareRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d
  558.  
  559.  
  560.           This virtual can be re-defined by derived classes to issue requests
  561.           for any input data that is required in order to compute the
  562.           requested output page.  The default implementation assumes no
  563.           requests need to be issued for input data (this might be the case in
  564.           an operator that synthesizes its data).
  565.  
  566.      sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((())))
  567.  
  568.           static void setGlobalThrashMode(ilCacheThrashMode mode)
  569.  
  570.  
  571.           This static method sets the global thrash mode. The value is applied
  572.           to all existing objects derived from ilMemCacheImg and any such
  573.           objects created in the future.  The mode can have one of the two
  574.           following values:
  575.  
  576.           ilCacheThrashIgnore   Don't do anything special, just ignore
  577.                                 thrashing. This is the default mode.
  578.  
  579.           ilCacheThrashMonitor  Keep track of which pages have been computed
  580.                                 since reset, watching for pages that get
  581.                                 redundantly loaded into cache. The wasted time
  582.                                 spent processing pages more than once can be
  583.                                 returned with the ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee() method when
  584.                                 this mode is set.
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  599.  
  600.  
  601.  
  602.      sssseeeettttPPPPaaaaggggeeee(((())))
  603.  
  604.           virtual ilStatus setPage(ilMpCacheRequest* req)   _p_r_o_t_e_c_t_e_d
  605.  
  606.  
  607.           This method is redefined in the derived ilFileImg class to write a
  608.           page of data to a disk tile. Currently this is method is not useable
  609.           by other derived classes.  sssseeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee(((())))
  610.  
  611.           void setPageAllocTime(AllocTime when)   _p_r_o_t_e_c_t_e_d
  612.  
  613.  
  614.           Sets the page allocation time; i.e. when a page's data should be
  615.           allocated: prepare time (_i_l_P_a_g_e_A_l_l_o_c_A_t_P_r_e_p_a_r_e) or execute time
  616.           (_i_l_P_a_g_e_A_l_l_o_c_A_t_C_o_m_p_u_t_e). The default setting is at execute time.
  617.  
  618.      sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(((())))
  619.  
  620.           void setRetainMode(ilCacheRetainMode mode)
  621.  
  622.  
  623.           This method sets the page retention mode. The mode can have one of
  624.           the two following values:
  625.  
  626.           ilCacheRetainOff      Don't save unmodified cache pages when they
  627.                                 must be discarded because the cache is full.
  628.                                 This is the default mode.
  629.  
  630.           ilCacheRetainOn       Keep pages for this image in a temporary file
  631.                                 when they must be removed from the cache
  632.                                 because the cache is full. These pages will be
  633.                                 read from the temporary file rather than being
  634.                                 recomputed if they are needed again later.
  635.  
  636.      sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh(((())))
  637.  
  638.           static void setRetainPath(const char* path)
  639.  
  640.  
  641.           This static method sets the directory path to be used for temporary
  642.           files that hold retainted pages when enabled with sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee().
  643.           The default value is as described for tttteeeemmmmppppnnnnaaaammmm(3S)
  644.  
  645.      sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((())))
  646.  
  647.           void setThrashMode(ilCacheThrashMode mode)
  648.  
  649.  
  650.           This method sets the thrash mode for this object.  The thrash mode
  651.           can have one of the values described in sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee().
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  665.  
  666.  
  667.  
  668. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  669.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg
  670.      enablePagingCallback(), flush(), getCacheSize(),
  671.      isPagingCallbackEnabled(), listResident()
  672.  
  673.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIImmmmaaaaggggeeee
  674.      addInput(), allocFillData(), checkColorModel(), checkValidOrder(),
  675.      checkValidType(), clipTile(), configureRetainedCache(), copy(),
  676.      copyTile(), copyTile3D(), copyTileCfg(), fillTile(), fillTile3D(),
  677.      fillTileRGB(), freeFillData(), getColorImg(), getColorModel(),
  678.      getColormap(), getCompression(), getConfig(), getCopyConverter(),
  679.      getCsize(), getDataType(), getDimensions(), getDirectInput(),
  680.      getDisplayCacheEnable(), getFill(), getFillData(), getFillValue(),
  681.      getHeight(), getHwEnable(), getHwHint(), getHwIntHint(), getHwOp(),
  682.      getHwPassTable(), getInput(), getInputTileRequirement(),
  683.      getLockTileSet(), getMaxColormapLevels(), getMaxValue(), getMinValue(),
  684.      getNumChans(), getNumInputs(), getOrder(), getOrientation(),
  685.      getPageBorder(), getPageBorderX(), getPageBorderY(), getPageBorderZ(),
  686.      getPageCounts(), getPageDelta(), getPageDimensions(), getPageIndices(),
  687.      getPageOrigin(), getPageOriginC(), getPageOriginX(), getPageOriginY(),
  688.      getPageOriginZ(), getPageSize(), getPageSizeC(), getPageSizePix(),
  689.      getPageSizeVal(), getPageSizeX(), getPageSizeY(), getPageSizeZ(),
  690.      getPixel(), getPixel3D(), getPriority(), getScaleMax(), getScaleMin(),
  691.      getSize(), getStrides(), getSubTile(), getSubTile3D(), getTile(),
  692.      getTile3D(), getWidth(), getXsize(), getYsize(), getZsize(),
  693.      hasPageBorder(), hasPages(), hwDefine(), hwGetPass(), inherit(),
  694.      initColorModel(), initHwEnable(), initMinMax(), initPageSize(),
  695.      initScaleMinMax(), isColorImg(), isIntegral(), isMirrorOrientation(),
  696.      isPartialPage(), isSigned(), isValidPage(), isWritable(), lockPage(),
  697.      lockPageSet(), lockTile(), lockTile3D(), mapFlipTrans(), mapFromInput(),
  698.      mapFromSource(), mapOrientation(), mapSize(), mapTile(), mapToInput(),
  699.      mapToSource(), mapXY(), mapXYSign(), outOfBound(), qCopyTileCfg(),
  700.      qFillTile3D(), qFillTileRGB(), qGetSubTile3D(), qGetTile3D(),
  701.      qLockPageSet(), qSetSubTile3D(), qSetTile3D(), removeHwHint(),
  702.      removeInput(), reset(), setColorModel(), setColormap(), setCompression(),
  703.      setCsize(), setDataType(), setDisplayCacheEnable(), setFill(),
  704.      setFillValue(), setHwEnable(), setHwHint(), setHwIntHint(), setInput(),
  705.      setMaxColormapLevels(), setMaxValue(), setMinValue(), setNumChans(),
  706.      setNumInputs(), setOrder(), setOrientation(), setPageBorder(),
  707.      setPageSize(), setPageSizeC(), setPageSizeZ(), setPixel(), setPixel3D(),
  708.      setPriority(), setScaleMinMax(), setScaleType(), setSize(), setSubTile(),
  709.      setSubTile3D(), setTile(), setTile3D(), setTileRequirementFunction(),
  710.      setWritable(), setXsize(), setYsize(), setZsize(), unlockPage(),
  711.      unlockPageSet()
  712.  
  713.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllLLLLiiiinnnnkkkk
  714.      addResetCallback(), alterAction(), anyAltered(), clearAllowed(),
  715.      clearSet(), clearStatus(), deleteRelated(), disableAltered(),
  716.      dumpChain(), getClassPropSet(), getDescription(), getDirectParent(),
  717.      getDisabledIndex(), getFloatProp(), getGenerationID(), getIntProp(),
  718.      getMaxIndex(), getMinIndex(), getNumChildren(), getNumParents(),
  719.      getParent(), getProp(), getProp(), getPropSet(), getPtrProp(),
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll   iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  731.  
  732.  
  733.  
  734.      getRelatedChild(), getRelatedDelete(), getRelatedType(), getStatus(),
  735.      hasResetCallbacks(), ilGetClassPropSet(), inProgress(), isAllowed(),
  736.      isAltered(), isEnabled(), isRelated(), isSet(), markSet(), mpUnlock(),
  737.      neverReset(), newRelatedType(), removeParent(), removeProp(),
  738.      removeResetCallback(), reset(), resetAltered(), resetCheck(),
  739.      setAllowed(), setAltered(), setDescription(), setDisabledIndex(),
  740.      setEnabled(), setParent(), setProp(), setPropAltered(),
  741.      setRelatedDelete(), setRelatedType(), setStatus(), stopWatching(),
  742.      unalterable(), watch(), watchNotify()
  743.  
  744.  
  745. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  746.      ilImage(3), ilCacheImg(3), ilFileImg(3), ilMondadicImg(3), ilPolyadi-
  747.      cImg(3), ilSpatialImg(3), ilWarpImg(3), ilFPolyadicImg(3), ilTileIm-
  748.      gIter(3)
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.